#include "rec.h"

/*
    ODE_rec_test is designed for quick numerical test of the RHS.
*/
void ODE_rec_test( cosmo_params *cp ){
    double z_start  = 1500;
    double a_ini    = 1./(1+z_start);
    double lna_ini  = log(a_ini);

    double z_stop   = 300;
    double a_stop   = 1./(1+z_stop);
    double lna_stop = log(a_stop);

    int steps = 1000;
    double dlna = (lna_stop-lna_ini)/(steps-1);

    double y;
    double f;

    for( int i=0; i<steps; i++ ){
        double lna = lna_ini + i*dlna;
        y = 0.5;    // Xe=0.5, this can be changed to other values in (0,1)
        ODE_rec( lna, &y, &f, cp );

        printf("lna = %g, f = %g\n", lna, f);
    }
}